package com.jeesite.common.utils.excel.fieldtype;

import com.jeesite.common.utils.SpringUtils;
import com.jeesite.modules.fl.entity.Doctor;
import com.jeesite.modules.fl.service.DoctorService;

public class DoctorType {
	
	private static DoctorService doctorService = SpringUtils.getBean(DoctorService.class);

	public static Object getValue(String val)
    {
        return doctorService.getByName(val);
    }
	
	public static String setValue(Object val)
    {
        if(val instanceof Doctor)
        {
        	  Doctor doctor = (Doctor)val;
            return doctor.getName();
        } else
        {
            return "";
        }
    }
}
